package com.sfy.mapper;

import com.sfy.pojo.Emp;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

@Mapper
@Repository
public interface EmpMapper {

//    //查询总记录数
//    @Select("select count(*) from emp")
//    public Long count();
//
//    //分页查询获取列表数据
//    @Select("select * from emp limit #{start}, #{pageSize};")
//    public List<Emp> selectByPage(@Param("start") Integer start, @Param("pageSize") Integer pageSize);


    //条件查询
    List<Emp> selectByPage(@Param(value = "name") String name, @Param("gender") Short gender, @Param("begin") LocalDate begin, @Param("end") LocalDateTime end);
}
